package net.xju_springJdbc19_20.service.impl;

import net.xju_springJdbc19_20.dao.StuDao;
import net.xju_springJdbc19_20.entity.Stu;
import net.xju_springJdbc19_20.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.FileNotFoundException;
import java.util.Collections;
import java.util.List;

@Service
public class StuServiceImpl implements StuService {

    @Autowired
    private StuDao stuDao;

    @Override
    public List<Stu> findAll() {
        return stuDao.findAll();
    }

    @Override
    public Integer addStu(Stu stu) throws FileNotFoundException {
        return stuDao.insert(stu);
    }
}
